package com.zrwl.poscloud.base.enums;

/**
 * 消息模板类型
 */
public enum EMessageModelType {

    SMS(1,1,9,"短信"),//短信消息
    SMS_VERIFICATION_CODE(101,1,9,"短信-通用验证码"),//通用验证码
    SMS_CARD_OPERATOR_DAILY(102,1,9,"短信-卡务操作员日报"),//卡务操作员日报
    SMS_CONSUMER_DAILY(103,1,9,"短信-消费日报"),//消费日报
    SMS_DEVICE_OFFLINE(104,1,9,"短信-设备离线"),//设备离线
    SMS_PURCHASED_RESOURCE_BALANCE(105,1,9,"短信-已购资源余量"),//已购资源余量
    WX(2,1,9,""),//微信消息
    WX_BILLING_NOTICE(201,1,9,"微信-结算账单通知"),//结算账单通知
    WX_INSUFFICIENT_BALANCE_REMINDER(202,1,9,"微信-余额不足提醒"),//余额不足提醒
    WX_ATTENDANCE_NOTIFICATION(203,1,9,"微信-考勤通知"),//考勤通知
    WX_DEVICE_ABNORMAL_NOTIFICATION(204,1,9,"微信-设备异常通知"),//设备异常通知
    WX_BUSINESS_COMPLETION_REMINDER(205,1,9,"微信-业务办理完成提醒"),//业务办理完成提醒
    WX_SYSTEM_ABNORMAL_REMINDER(206,1,9,"微信-系统异常提醒"),//系统异常提醒
    WX_PUNCH_EXCEPTION_NOTIFICATION(207,1,9,"微信-打卡异常通知"),//打卡异常通知
    WX_PURCHASED_RESOURCE_BALANCE(208,1,9,"微信-已购资源余量不足提醒"),//已购资源余量不足提醒

    /**
     * 演示-End
     */
    Example(0, 1, 100, "测试");

    private final int type;
    private final int start;
    private final int length;
    private final String name;

    EMessageModelType(int type, int start, int length, String name) {
        this.type = type;
        this.start = start;
        this.length = length;
        this.name = name;
    }
    public int getStart() {
        return start;
    }

    public int getLength() {
        return length;
    }

    public int getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static EMessageModelType getByValue(int value) {
        for (EMessageModelType eMessageModelType : values()) {
            if (eMessageModelType.getType() == value) {
                return eMessageModelType;
            }
        }
        return null;
    }
}
